home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 696 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.2 KB

  1. From: "W. Dicks" <wd@isis.co.za>
  2. Message-ID: <4i5sf3$89c@hermes.is.co.za>
  3. X-Original-Date: 13 Mar 1996 07:11:31 GMT
  4. Path: in2.uu.net!bounce-back
  5. Date: 13 Mar 96 07:31:13 GMT
  6. Approved: fjh@cs.mu.oz.au
  7. Newsgroups: comp.std.c++
  8. Subject: String value of enum
  9. Organization: No organisation supplied
  10. X-Mailer: Mozilla 1.22 (Windows; I; 32bit)
  11. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  12.     iQBFAgUBMUZ5z+EDnX0m9pzZAQGZ8gF/awX1a85IRTjqZuBmJDOJdyV5CGtIYFCN
  13.     1X1PWFC+NQSh5kkKnC8rjs1N2EZw/Vcw
  14.     =Ngk6
  15.  
  16. The system that I'm working often needs to know the string 
  17. value of an enum. e.g. enum week{MON=1, ..., SUN} it; it = 
  18. TUE;
  19. Then when this enum is passed as a parameter the function 
  20. should return the string based on the enum. For instance, 
  21. weekImage(it) will return "TUE". Is it not possible that such 
  22. a functionality can be built into enums?
  23. ---
  24. [ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
  25. [ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
  26. [ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
  27. [ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
  28. [ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]
  29.